<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: hp
  Date: 2021/3/26
  Time: 20:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>index页面</title>
</head>
<body>
    <%-- 如果要在jsp中写java代码，必须要写脚本段中--%>
    <%
        //获取域对象内容
        String name = (String) req.getAttribute("name");
        System.out.println("name:"+name);
        Integer age = (Integer) req.getAttribute("age");
        System.out.println("age"+age);
        List<String> list = (List<String>) req.getAttribute("list");
        System.out.println(list.get(0));
    %>
</body>
</html>
